#!/bin/bash
# mysql connection data

log_file="/var/log/mysql_count.log"

user="root"
passwd="123456"

while :
do
	sleep 2
	count=`mysqladmin -u"$user" -p"$passwd" status | awk '{print $4}'`
	echo "`date +%Y-%m-%d` bingfacount:$count" >>$log_file 
done
